//
//  CQNavigationItemFactory.m
//  CQFramework
//
//  Created by runo on 16/5/27.
//  Copyright © 2016年 caoqin. All rights reserved.
//

#import "CQNavigationItemFactory.h"
#import "CQCommonHeader.h"
#import <UIKit/UIKit.h>

@implementation CQNavigationItemFactory

+(UILabel *)cqNAVTitle:(NSString *)title{
    
    UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 200, 44)];
    titleLabel.text = title;
    titleLabel.font = [UIFont boldSystemFontOfSize:17];
    titleLabel.textColor = kWhiteColor;
    titleLabel.textAlignment = NSTextAlignmentCenter;
    return titleLabel;
}

+(UILabel *)cqNAVTitle:(NSString *)title FontSize:(CGFloat )font{
    
    UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 200, 44)];
    titleLabel.text = title;
    titleLabel.font = [UIFont boldSystemFontOfSize:font];
    titleLabel.textColor = kWhiteColor;
    titleLabel.textAlignment = NSTextAlignmentCenter;
    return titleLabel;
}

+(UILabel *)cqNAVTitle:(NSString *)title FontSize:(CGFloat )font TitleColor:(UIColor *)titleColor{
    
    UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 200, 44)];
    titleLabel.text = title;
    titleLabel.font = [UIFont boldSystemFontOfSize:font];
    titleLabel.textColor = titleColor;
    titleLabel.textAlignment = NSTextAlignmentCenter;
    return titleLabel;
}

+(UIBarButtonItem *)cqNavItemWithImgage:(UIImage *)img Targed:(id)target Action:(SEL)action Size:(CGSize)size{
    
    UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    rightBtn.frame = CGRectMake(0, 0, size.width, size.height);
    UIImage *rightImg = img;
    [rightBtn addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
    [rightBtn setImage:rightImg forState:UIControlStateNormal];
    UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]initWithCustomView:rightBtn];
    return rightItem;
}

@end
